package com.huanmeiqi.drools.demo.boot;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author cq.Wang
 * @date 2018/7/6 13:55
 * @description
 */
@Component
public class RulesCommandLineRunner implements CommandLineRunner {

    @Autowired
    private ReloadDroolsRules reloadDroolsRules;

    @Override
    public void run(String... args) throws Exception {
        reloadDroolsRules.reloadAll();
    }
}
